<template>
  <div class="home">
    <div
      class="word-thing"
      :class="{ choose: taskParams.status === -1 }"
      @click="chooseTask('status', -1)"
    >
      <span class="thing-title">待处理</span>
    </div>
    <div
      class="word-thing"
      :class="{ choose: taskParams.status === 1 }"
      @click="chooseTask('status', 1)"
    >
      <span class="thing-title">已处理</span>
    </div>
    <div class="home-content">
      <List :table-cloumn="homeTable"/>
    </div>
  </div>
</template>

<script type="text/javascript">
import List from "./list/List";
import {homeTable} from "../constants/pages/homeTable";
export default {
  name: "home",
  data() {
    return {
      homeTable: homeTable,
      data: {
        // 总页数
        total: 0,
        pageTotal: 0
      },
      taskParams: {
        // 事件的分页参数
        pageSize: 10,
        pageNo: 0,
        type: 0,
        status: -1
      },
      dataList: [
        {
          title: "税务发票已经接收，正在审核",
          type: "寄送发票",
          status: "处理中"
        }
      ],
      taskType: [
        {
          title: "全部",
          value: 0
        },
        {
          title: "通知",
          value: 1
        }
      ]
    };
  },
  filters: {
    formatDate(time, type) {
      if (time) {
        const date = new Date(time);
        return `${date.getFullYear()}年${date.getMonth() +
          1}月${date.getDate()}日`;
      } else {
        return "";
      }
    }
  },
  mounted() {
  },
  watch: {},
  methods: {
    init () {
    }
  },
  components: {
    List
  }
};
</script>

<style lang="less" scoped>
.home {
  
    .word-thing {
      margin-bottom: 20px;
      display: inline-block;
      margin-right: 20px;
      border-bottom: 1px solid #dcdcdc;
      width: 80px;
      text-align: center;
      cursor: pointer;
      .thing-title {
        font-size: 20px;
        color: #666;
        display: inline-block;
      }
    }
    .thing-num {
      font-size: 20px;
      color: #fb3e18;
      float: right;
    }
    .choose {
      border-bottom: 1px solid #3080fe;
      .thing-title {
        color: #3080fe;
      }
    }
}
</style>
